package com.supermali.entity.map.background.dynamic;

import com.supermali.behavior.up.land.UpMiss;
import com.supermali.creater.MapCreater;
import com.supermali.creater.img.ImgHelper;
import com.supermali.creater.img.ImgKey;
import com.supermali.creater.img.ImgLoader;

import java.awt.image.BufferedImage;

public class ThinCoin extends DynamicBackGroundMapAbstract {

    UpMiss upMiss;

    public ThinCoin(Double x, Double y, MapCreater mapCreater) {
        super(x, y, mapCreater);
        upMiss = new UpMiss(this);
    }

    @Override
    public void proccessData(long delta) {
//        super.proccessData(delta);
        if(!upMiss.isOver()){
            upMiss.up(delta);
        }
    }

    @Override
    public void init() {
        ImgHelper imgHelper = ImgLoader.getImgHelper(ImgKey.Background.THIN_COIN);
        BufferedImage select = imgHelper.select(0);
        this.setBufferedImage(select);
    }

    public UpMiss getUpMiss() {
        return upMiss;
    }
}
